<template>
  <div class="tabdetial">
    <Nav></Nav>
    <div class="banner-wrap">
      <img class="banner" :src="tabdetailBg" />
      <!-- <div class="btn">点击查看</div> -->
    </div>
    <div class="wrap">
    
    <div v-for="item in info.advertise" :key="item">
    <img @click="goToDetail()" :src="item.coverimage"/>
    </div>
     <div class="tab">
        <span class="line"></span>
        <span>资讯中心</span>
        <span>浙江新高考</span>
        <span class="more" @click="goToMore(info.article[0].category_id)"> <img src="../../assets/pc/homepage-more.png" /></span>
      </div>

    <div class="introduce-wrap">
    <div
        class="introduce-wrap-item"
        v-for="(item, index) in info.article"
        @click="gotoSchool(item.id)"
        :key="item.name"
    >
        <consultationProject
        :changeFlag="false"
        :index="index"
        :introduce="item"
        :readMore="false"
        ></consultationProject>
    </div>
    </div>



    </div>

    <Footer></Footer>
  </div>
</template>

<script setup>
import Footer from '../../components/pc/Footer.vue';
import Nav from '../../components/pc/nav.vue';
import schoolProject from '../../components/pc/schoolProject.vue';
import introduceProject from '../../components/pc/introduceProject.vue';
import consultationProject from '../../components/pc/consultationProject.vue';
import { onMounted, ref } from 'vue';
import { getZhejiangPC } from '../../api/apiList/pcApi.js';
import tabdetailBg from '../../assets/pc/newTestPc-bg.png';
import homepageTab2 from '../../assets/pc/homepage-tab2.png';
import homepageTab3 from '../../assets/pc/homepage-tab3.png';
import homepageTab4 from '../../assets/pc/homepage-tab4.png';
import homepageTab5 from '../../assets/pc/homepage-tab5.png';
let info = ref({});
import { useRouter } from 'vue-router';
const router = useRouter();
onMounted(async () => {
  console.log(11);
  // 获取列表数据
  await getZhejiangPC().then((res) => {
    const { result } = res;
    info.value = result;
  });
});
const goToMore = (id) => {
   router.push({ path: '/zixunListPc' , query: { id, type: 3 }});
};
const goToDetail = () => {
  router.push({ path: '/companyPc', query: { type : 2 } });
};


</script>

<style lang="less" scoped>
.tabdetial {
  .wrap {
    position: relative;
    width: 1201Px;
    margin: 0 auto;
    img {
        width: 1199Px;
        height: 666Px;
         cursor: pointer;
    }
    .btn {
      position: absolute;
      left: 289Px;
      top: -110Px;
      text-align: center;
      line-height: 60Px;
      width: 293Px;
      height: 60Px;
      background: #ffffff;
      border-radius: 40Px;
      font-size: 32Px;
      font-family: PingFangSC-Medium, PingFang SC;
      font-weight: 500;
      color: #666666;
    }
  }
  .banner-wrap {
    position: relative;
    width: 100vw;
    height: auto;
  }
  .banner {
    width: 100vw;
    height: auto;
    margin-bottom: 30Px;
   
  }
  .tab {
    font-size: 23Px;
    font-family: PingFangSC-Medium, PingFang SC;
    font-weight: 500;
    color: #000;
    line-height: 40Px;
    margin-bottom: 30Px;
    display: flex;
    align-items: center;
    position: relative;
     .more {
        cursor: pointer;
        position: absolute;
        right: 0;
        top:0;
        width: 100px;
        height: 10px;
        font-weight: bold;
        color: #034171;
        font-size: 18Px;
        text-align: right;
        img {
            width: 120Px;
            height: auto!important;
        }
    }
    .line {
        width: 3Px;
        height: 20Px;
        background: linear-gradient(140deg, #011a35 0%, #000000 100%);
    }
    span {
      display: inline-block;
      margin-right: 20Px;
    }
  }

.introduce-wrap {
    margin-top: 15Px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
  }
}
</style>
